The histogram of gray levels provides an entire description of the appearance of an image. Gray levels properly controlled with respect to a given image enhances the appearance or contrast of the image.
Histogram equalization is the most widely used and well-known among the methods for contrast enhancement. A method for enhancing the contrast of a given image according to the sample distribution of the image is disclosed in the following references: [1] J. S. Lim, "Two-Dimensional Signal and Image processing", Prentice Hall, Englewood Cliffs, N.J., 1990, [2] R. C. Gonzalez and P. Wints, "Digital Image Processing," Addison-Wesley, Reading, Mass. 1977.
Generally, since histogram equalization (so-called "distribution equalization") has an effect for expanding the dynamic range, histogram equalization flattens the gray level distribution of the resultant image, so that the contrast of the image is enhanced.
Particularly, the histogram equalization in a medical engineering field as a method for distinct contrast between pixels of an image which is picked up indistinctly is very important in the recognition of the image.
Here, a typical histogram equalization method will be described briefly.
A given image {X} is composed of L discrete gray levels {X.sub.0, X.sub.1, . . . , X.sub.L-1 }. Here, X.sub.0 =0 represents a black level, and X.sub.L-1 =1 represents a white level.
A probability density function (PDF) is defined by the following formula (1). ##EQU1##
Here, n.sub.k represents the frequency of the grays level (X.sub.k) in the image {x}, and n represents the number of total samples (pixels) in the image {X}. Also, a cumulative distribution function (CDF) is defined by the following formula (2). ##EQU2##
An output (Y) of the typical histogram equalization with respect to an input sample (X.sub.k) of the given image is obtained by the following formula (3) based on the CDF. EQU Y=c(X.sub.k)X.sub.L-1 (3)
The histogram equalization method will be described in detail with reference to FIGS. 1 through 3.
FIG. 1 shows an example of a PDF of a specific image. That is, a luminance signal with a brightness of 0.about.255 gray levels is input, the number of pixels at each gray level is then counted, and the result is divided by the total number of pixels to obtain the result shown in FIG. 1.
FIG. 2 shows a curve of the CDF obtained, based on the PDF of FIG. 1. For example, when the value of the CDF corresponding to the gray level "100" at the point P is 0.875, which indicates that the number of pixels corresponding to 100 or less gray levels is 87.5% with respect to the input image.
FIG. 3 shows the PDF of the image passed through histogram equalization based on the CDF shown in FIG. 2. That is, the level of the output signal (Y) after histogram-equalizing an input pixel Y.sub.IN is mapped into a level by the following formula (4). EQU Y=CDF value corresponding to Y.sub.IN.times.the maximum gray level (X.sub.L-1) (4)
For example, the output gray level after the input pixel having the gray level "100" has been histogram-equalized is mapped into 224 (=0.875.times.255) levels.
If the input image signal is an analog signal, the new PDF has a straight line (uniform distribution curve) having about 0.004 (=1/256) levels over the whole interval, like Q of FIG. 3. However, if the input image signal is a digital signal, the histogram equalization is performed to a quantized level, and the result of FIG. 3 is obtained. That is, assuming that the output gray level based on the CDF value (0.37) of FIG. 2 is mapped into about "95" when the input gray level is "51", and the output gray level based on the CDF value (0.47) of FIG. 2 is mapped into about "120" when the input gray level is "52", the output gray level of the input image signal having a gray level between "51" and "52" should be mapped into between about 95 and 120. However, a gray level between "51" and "52" does not exist when quantization is performed, so that a uniform distribution curve cannot be obtained.
Thus, as can be seen from FIGS. 1 and 3, the luminance level of the input image concentrated between the gray levels "50" and "100" is mapped into an extended luminance level having the gray levels between 10 and 200, so that the contrast is enhanced.
However, the above-described histogram equalization method has been applied to a still image to improve the image recognition capability and the contrast of the still image due to its problems related to the processing time required for obtaining the values of PDF and CDF and the hardware thereof, which causes a problem in that a frame memory for storing a frame image and a hardware-rich dividing circuit for real-time processing are required when being applied to a moving image.